//
//  NvUploadManager.m
//  NvSellerShowSDK
//
//  Created by roc on 17/9/17.
//  Copyright © 2017年 roc. All rights reserved.
//

#import "NvUploadManager.h"

@implementation NvUploadManager

+ (NvUploadManager *)defaultManager {
    static NvUploadManager *sharedAccountManagerInstance = nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        sharedAccountManagerInstance = [[self alloc] init];
    });
    return sharedAccountManagerInstance;
}

- (void)uploadTaskfromFile:(NSDictionary *)userInfo
               progressValue:(void (^)(NSProgress *progress))returnBlock
         completionHandler:(void (^)(NSError *error))completionHandler {
    if (self.delegate != nil && [self.delegate respondsToSelector:@selector(uploadTaskfromFile:progressValue:completionHandler:)]) {
        [self.delegate uploadTaskfromFile:userInfo progressValue:returnBlock completionHandler:completionHandler];
    }
}

- (void)orderThemeDataWith:(NSString *)themeOrderUrl{
    if (self.delegate != nil && [self.delegate respondsToSelector:@selector(orderThemeDataWith:)]) {
        [self.delegate orderThemeDataWith:themeOrderUrl];
    }
}

- (void)initThemeDataWithCompletionHandler:(void(^)(NSArray <NSDictionary *>* themeArray,NSString *errorDescription))completionHandler {
    if (self.delegate != nil && [self.delegate respondsToSelector:@selector(initThemeDataWithCompletionHandler:)]) {
        [self.delegate initThemeDataWithCompletionHandler:completionHandler];
    }
}

@end
